package experimentUI;

import javax.swing.*;
import java.awt.*;

/*
错误时弹出的对话框
 */
public class ErrorDialog extends JDialog {
    public ErrorDialog(String text,Frame f){
        super(f,"error",true);
        Container container = getContentPane();
        JLabel jl=new JLabel(text);
        container.add(jl);
        setBounds(120,120,400,100);
        jl.setHorizontalAlignment(SwingConstants.CENTER);
        setVisible(true);
    }
}
